package com.xrkj.miniprogram.server.controller;

import com.xrkj.miniprogram.server.entity.RegistrationRequest;
import com.xrkj.miniprogram.server.service.RegisterConfirmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class RegisterConfirmController {
    @Autowired
    RegisterConfirmService service;
    @RequestMapping("/registerConfirm")
    public Map<String,String> registerConfirm(Integer registrationRequestID){
        service.registerConfirm(registrationRequestID);
        Map<String,String> map=new HashMap<>();
        map.put("msg","success");
        return map;

    }

    @RequestMapping("/getAllRegistration")
    public List<RegistrationRequest> getAllRegistration(){
        return service.getAllRegistrationRequest();
    }
}
